<template>
  <div class="search-bar">
    <input type="text" placeholder="空调" />
    <a href="javascript:;"><i></i></a>
  </div>
</template>

<script>
export default {
  name: 'search-bar',
  data() {
    return {}
  },
}
</script>

<style lang="scss">
.search-bar {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 0;
  width: 319px;
  height: 50px;
  border: 1px solid #e0e0e0;
  display: flex;
  input {
    border: none;
    height: 100%;
    width: calc(100% - 50px);
    box-sizing: border-box;
    border-right: 1px solid #e0e0e0;
    font-size: 16px;
    padding-left: 8px;
  }
  a {
    right: 0;
    width: 50px;
    height: 50px;
    i {
      display: inline-block;
      width: 18px;
      height: 18px;
      margin-top: 16px;
      background-image: url(../../public/img/icon-search.png);
      background-size: cover;
    }
  }
}
</style>